namespace Ocean.Transfer.Tools
{
    public partial class FrmMain : Form
    {
        public FrmMain()
        {
            InitializeComponent();
        }

        private void FrmMain_Load(object sender, EventArgs e)
        {
            // 设置窗体图标和样式
            this.Icon = SystemIcons.Application;
        }

        private void btnSqliteToSqlServer_Click(object sender, EventArgs e)
        {
            try
            {
                var form = new FrmSqliteToSQLServer();
                form.ShowDialog();
            }
            catch (Exception ex)
            {
                MessageBox.Show($"打开 SQLite 到 SQL Server 迁移工具失败: {ex.Message}", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        private void btnSqlServerToSqlite_Click(object sender, EventArgs e)
        {
            try
            {
                var form = new FrmSQLServerToSqlite();
                form.ShowDialog();
            }
            catch (Exception ex)
            {
                MessageBox.Show($"打开 SQL Server 到 SQLite 迁移工具失败: {ex.Message}", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }
    }
}